import FEzxwms from './lib/FEzxwms.json';
import login from './lib/login.json';
const lib = {
  login,
  FEzxwms,
};

export default name => {
  let step = name.split('-');
  let realName = '';
  realName = lib[step.pop()];
  while (true) {
    let stepName = step.pop();
    if (typeof stepName === 'undefined') {
      return {
        name,
        ...realName,
      };
    }
    realName = realName[stepName];
  }
};
